<?php

namespace app\index\controller\landing;

use app\index\model\UM as UM;
use app\index\service\Landing1Service;
use ShidianUtil\Thinkphp\Response\ApiResponse;
use think\APP;
use think\Request as Request;

/**
 * 落地页1 不填信息
 * Class Landing1Fast
 * @package app\index\controller\landing
 */
class Landing1Fast
{
    // 请求参数
    private Request $request;

    // service
    private Landing1Service $service;

    public function __construct(Request $request, Landing1Service $service)
    {
        $this->request = $request;
        $this->service = $service;
    }

    /**
     * 新增|修改
     * @param UM $user
     * @return ApiResponse
     * @url /landing/landing1_fast/save
     */
    public function save(UM $user): ApiResponse
    {
        $request = $this->request;

        return ApiResponse::success($this->service->save2($user, $request->param()));
    }

}
